<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pay_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-pay_id" data-rule="required" data-source="pay_company/index" class="form-control selectpage" name="row[pay_id]" type="text" value="{$row.pay_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Rate_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-rate_ids" data-rule="required" data-source="rate/index" data-multiple="true" class="form-control selectpage" name="row[rate_ids]" type="text" value="{$row.rate_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Transaction_type_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-transaction_type_ids" data-rule="required" data-source="transaction_type/index" data-multiple="true" class="form-control selectpage" name="row[transaction_type_ids]" type="text" value="{$row.transaction_type_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Card_type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-card_type" multiple="multiple" data-rule="required" class="form-control selectpicker" name="row[card_type][]">
                {foreach name="cardTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.card_type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('收款方式')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-channel_ids" data-rule="required" data-source="consume_channel/index" data-multiple="true" class="form-control selectpage" name="row[channel_ids]" type="text" value="{$row.channel_ids|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-price" data-rule="required" class="form-control" name="row[price]" type="number" value="{$row.price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('最小数量')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-min" data-rule="required" class="form-control" name="row[min]" type="number" value="{$row.min|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">售卖状态:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                <label for="row[sell_state]-1"><input id="row[sell_state]-1" name="row[sell_state]" type="radio" value="1" {if $row.sell_state == 1} checked{/if} /> 上架</label>
                <label for="row[sell_state]-2"><input id="row[sell_state]-2" name="row[sell_state]" type="radio" value="2" {if $row.sell_state == 2} checked{/if} /> 下架</label>
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
